<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition>

        <p:dialog id="EstudiosPrimariaCreateDlg" widgetVar="EstudiosPrimariaCreateDialog" modal="true" resizable="false" appendTo="@(body)" header="#{bundle.CreateEstudiosPrimariaTitle}">
            <h:form id="EstudiosPrimariaCreateForm">
                <h:panelGroup id="display">
                    <p:panelGrid columns="2" rendered="#{estudiosPrimariaController.selected != null}">
                        <p:outputLabel value="#{bundle.CreateEstudiosPrimariaLabel_duracion}" for="duracion" />
                        <p:inputText id="duracion" value="#{estudiosPrimariaController.selected.duracion}" title="#{bundle.CreateEstudiosPrimariaTitle_duracion}" />
                        <p:outputLabel value="#{bundle.CreateEstudiosPrimariaLabel_eliminado}" for="eliminado" />
                        <p:selectBooleanCheckbox id="eliminado" value="#{estudiosPrimariaController.selected.eliminado}" required="true" requiredMessage="#{bundle.EditEstudiosPrimariaRequiredMessage_eliminado}"/>
                        <p:outputLabel value="#{bundle.CreateEstudiosPrimariaLabel_escuela}" for="escuela" />
                        <p:selectOneMenu id="escuela" value="#{estudiosPrimariaController.selected.escuela}" required="true" requiredMessage="#{bundle.EditEstudiosPrimariaRequiredMessage_escuela}">
                            <f:selectItems value="#{escuelaController.itemsAvailableSelectOne}"
                                           var="escuelaItem"
                                           itemValue="#{escuelaItem}"/>
                        </p:selectOneMenu>
                        <p:outputLabel value="#{bundle.CreateEstudiosPrimariaLabel_usuario}" for="usuario" />
                        <p:selectOneMenu id="usuario" value="#{estudiosPrimariaController.selected.usuario}" required="true" requiredMessage="#{bundle.EditEstudiosPrimariaRequiredMessage_usuario}">
                            <f:selectItems value="#{usuarioController.itemsAvailableSelectOne}"
                                           var="usuarioItem"
                                           itemValue="#{usuarioItem}"/>
                        </p:selectOneMenu>
                    </p:panelGrid>
                    <p:commandButton actionListener="#{estudiosPrimariaController.create}" value="#{bundle.Save}" update="display,:EstudiosPrimariaListForm:datalist,:growl" oncomplete="handleSubmit(args,'EstudiosPrimariaCreateDialog');"/>
                    <p:commandButton value="#{bundle.Cancel}" onclick="EstudiosPrimariaCreateDialog.hide()"/>
                </h:panelGroup>
            </h:form>
        </p:dialog>

    </ui:composition>
</html>
